class PlayerEntity {
  String? index;
  String? playerLogo;
  String? playerName;
  String? playerPosition;
  String? playerRebounds;
  String? playerAssists;
  String? playerPoints;
  String? teamLogo;
  String? teamName;
  List<String>? values;

  PlayerEntity(
      {this.index,
      this.playerAssists,
      this.playerLogo,
      this.playerName,
      this.playerPosition,
      this.playerRebounds,
      this.playerPoints,
      this.teamLogo,
      this.teamName,
      this.values});

  PlayerEntity.fromJson(Map<String, dynamic> json) {
    index = json['index'];
    playerAssists = json['playerAssists'];
    playerLogo = json['playerLogo'];
    playerName = json['playerName'];
    playerPosition = json['playerPosition'];
    playerRebounds = json['playerRebounds'];
    playerPoints = json['playerPoints'];
    teamLogo = json['teamLogo'];
    teamName = json['teamName'];
    values = json['values'].cast<String>();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['index'] = this.index;
    data['playerAssists'] = this.playerAssists;
    data['playerLogo'] = this.playerLogo;
    data['playerName'] = this.playerName;
    data['playerPosition'] = this.playerPosition;
    data['playerRebounds'] = this.playerRebounds;
    data['playerPoints'] = this.playerPoints;
    data['teamLogo'] = this.teamLogo;
    data['teamName'] = this.teamName;
    data['values'] = this.values;
    return data;
  }
}

class AllPlayerEntity {
  List<String>? header;
  PlayerByType? data;

  AllPlayerEntity({this.header, this.data});

  AllPlayerEntity.fromJson(Map<String, dynamic> json) {
    header = json['header'].cast<String>();
    data = json['data'] != null ? new PlayerByType.fromJson(json['data']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['header'] = this.header;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    return data;
  }
}

class PlayerByType {
  List<PlayerEntity>? all;
  List<PlayerEntity>? home;
  List<PlayerEntity>? guest;

  PlayerByType({this.all, this.home, this.guest});

  PlayerByType.fromJson(Map<String, dynamic> json) {
    if (json['all'] != null) {
      all = <PlayerEntity>[];
      json['all'].forEach((v) {
        all!.add(new PlayerEntity.fromJson(v));
      });
    }
    if (json['home'] != null) {
      home = <PlayerEntity>[];
      json['home'].forEach((v) {
        home!.add(new PlayerEntity.fromJson(v));
      });
    }
    if (json['guest'] != null) {
      guest = <PlayerEntity>[];
      json['guest'].forEach((v) {
        guest!.add(new PlayerEntity.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.all != null) {
      data['all'] = this.all!.map((v) => v.toJson()).toList();
    }
    if (this.home != null) {
      data['home'] = this.home!.map((v) => v.toJson()).toList();
    }
    if (this.guest != null) {
      data['guest'] = this.guest!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}